
 
 'D*BHJE  'DEJD'/J
 
 
 
 < d i v   a l i g n = " c e n t e r " > 
 
 	 < t a b l e   b o r d e r = " 2 "   w i d t h = " 2 0 % "   c e l l s p a c i n g = " 2 "   i d = " t a b l e 1 "   b o r d e r c o l o r l i g h t = " # F 1 D D A B "   b o r d e r c o l o r d a r k = " # F 1 D D A B "   c e l l p a d d i n g = " 2 " > 
 
 	 	 < t r > 
 
 	 	 	 < t d > & n b s p ; < S C R I P T   l a n g u a g e = J a v a S c r i p t > 
 
 f u n c t i o n   g o D o ( n e r d ) 
 
 { 
 
 
 
 } 
 
 v a r   n o w   =   n e w   D a t e ( ) ; 
 
 v a r   d a y _ a r r a y   =   n e w   A r r a y ( " S u n " , " M o n " , " T u e " , " W e d " , " T h u " , " F r i " , " S a t " ) 
 
 v a r   m o n t h _ a r r a y   =   n e w   A r r a y ( " J a n u a r y " , " F e b r u a r y " , " M a r c h " , " A p r i l " , " M a y " , " J u n e " , " J u l y " , " A u g u s t " , " S e p t e m b e r " , " O c t o b e r " , " N o v e m b e r " , " D e c e m b e r " ) ; 
 
 d o c u m e n t . w r i t e ( " < f o r m   n a m e = d a t e _ l i s t > < t a b l e   c e l l p a d d i n g = 1   c e l l s p a c i n g = 0   b g c o l o r =   # F 1 E F E 2   a l i g n = ' c e n t e r ' > < t r   a l i g n = ' c e n t e r ' > < t d   c o l s p a n = ' 2 '   c l a s s   = ' p a r a '   a l i g n = ' c e n t e r ' > < b > C a l e n d a r < / b > < / t d > < t r > < t d > " ) ; 
 
 d o c u m e n t . w r i t e ( " < s e l e c t   n a m e = m o n t h   c l a s s = ' p a r a ' o n c h a n g e = c h a n g e _ m o n t h ( t h i s . o p t i o n s . s e l e c t e d I n d e x ) > " ) ; 
 
 f o r ( i = 0 ; i < m o n t h _ a r r a y . l e n g t h ; i + + ) 
 
 { 
 
   i f   ( n o w . g e t M o n t h ( )   ! =   i ) 
 
   { d o c u m e n t . w r i t e   ( " < o p t i o n   v a l u e = " + i + " > " + m o n t h _ a r r a y [ i ] ) ; } 
 
   e l s e 
 
   { d o c u m e n t . w r i t e   ( " < o p t i o n   v a l u e = " + i + "   s e l e c t e d > " + m o n t h _ a r r a y [ i ] ) ; } 
 
 
 
 } 
 
 d o c u m e n t . w r i t e ( " < / s e l e c t > " ) ; 
 
 d o c u m e n t . w r i t e ( " < / t d > < t d > " ) ; 
 
 d o c u m e n t . w r i t e   ( " < s e l e c t   n a m e = y e a r   c l a s s = ' p a r a '   o n c h a n g e = c h a n g e _ y e a r ( t h i s . o p t i o n s [ t h i s . o p t i o n s . s e l e c t e d I n d e x ] ) > " ) ; 
 
 f o r ( i = 2 0 0 0 ; i < 2 0 5 0 ; i + + ) 
 
 { 
 
   i f   ( n o w . g e t F u l l Y e a r ( )   ! =   i ) 
 
   { d o c u m e n t . w r i t e ( " < o p t i o n   v a l u e = " + i + " > " + i ) ; } 
 
   e l s e 
 
   { d o c u m e n t . w r i t e ( " < o p t i o n   v a l u e = " + i + "   s e l e c t e d > " + i ) ; } 
 
 } 
 
 d o c u m e n t . w r i t e ( " < / s e l e c t > < / t d > < / t r > < t r > < t d   c o l s p a n = 2 > < c e n t e r > " ) ; 
 
 
 
 d o c u m e n t . w r i t e ( " < t a b l e   b g c o l o r = w h i t e   b o r d e r = 0   c e l l s p a c i n g   =   0   c e l l p a d d i n g   =   0   w i d t h = 1 0 0 %   a l i g n = ' c e n t e r ' > < t r   b g c o l o r =   # F 1 E F E 2   a l i g n = ' c e n t e r ' > " ) ; 
 
 d o c u m e n t . w r i t e ( " < t d   c l a s s   = ' d a y m e n u ' > M < / t d > < t d   c l a s s   = ' d a y m e n u ' > T < / t d > < t d   c l a s s   = ' d a y m e n u ' > W < / t d > < t d   c l a s s   = ' d a y m e n u ' > T < / t d > < t d   c l a s s   = ' d a y m e n u ' > F < / t d > < t d   c l a s s   = ' d a y m e n u ' > S < / t d > < t d   c l a s s   = ' d a y m e n u ' > S < / t d > " ) ; 
 
 d o c u m e n t . w r i t e ( " < / t r > < t r > " ) ; 
 
 f o r ( j = 0 ; j < 6 ; j + + ) 
 
 { 
 
   f o r ( i = 0 ; i < 7 ; i + + ) 
 
   { 
 
       d o c u m e n t . w r i t e ( " < t d   a l i g n = ' c e n t e r '   c l a s s = ' d a y D i s p l a y ' > < d i v   i d = d " + i + " r " + j + " > < / d i v > < / t d > " ) 
 
   } 
 
   d o c u m e n t . w r i t e ( " < / t r > " ) ; 
 
 } 
 
 
 
 d o c u m e n t . w r i t e ( " < / t a b l e > " ) ; 
 
 
 
 d o c u m e n t . w r i t e ( " < / c e n t e r > < / f r o m > < / t d > < / t r > < / t a b l e > " ) ; 
 
 
 
 v a r   s h o w _ d a t e   =   n e w   D a t e ( ) ; 
 
 
 
 f u n c t i o n   s e t _ c a l ( s h o w _ d a t e ) 
 
 { 
 
 
 
 b e g i n _ d a y   =   n e w   D a t e   ( s h o w _ d a t e . g e t F u l l Y e a r ( ) , s h o w _ d a t e . g e t M o n t h ( ) ) ; 
 
 b e g i n _ d a y _ d a t e   =   b e g i n _ d a y . g e t D a y ( ) ; 
 
 e n d _ d a y   =   n e w   D a t e   ( s h o w _ d a t e . g e t F u l l Y e a r ( ) , s h o w _ d a t e . g e t M o n t h ( ) + 1 ) ; 
 
 c o u n t _ d a y   =   ( e n d _ d a y   -   b e g i n _ d a y ) / 1 0 0 0 / 6 0 / 6 0 / 2 4 ; 
 
 i f   ( b e g i n _ d a y . g e t M o n t h ( )   = =   2 )   c o u n t _ d a y   =   3 1 ; 
 
 e l s e 
 
 i f   ( b e g i n _ d a y . g e t M o n t h ( )   = =   9 )   c o u n t _ d a y   =   3 1 ; 
 
 i n p u t _ t a b l e ( b e g i n _ d a y _ d a t e , c o u n t _ d a y ) ; 
 
 } 
 
 s e t _ c a l ( s h o w _ d a t e ) ; 
 
 v a r   x   =   0 
 
 f u n c t i o n   i n p u t _ t a b l e ( b e g i n , c o u n t ) 
 
 { 
 
 
 
 
 
 i n i t ( ) ; 
 
 j = 0 ; 
 
 i f   ( b e g i n ! = 0 ) { i = b e g i n - 1 ; } e l s e { i = 6 ; } 
 
 f o r   ( c = 1 ; c < c o u n t + 1 ; c + + ) 
 
 { 
 
   c o l u m _ n a m e   =   " d " + i + " r " + j ; 
 
 
 
   c o l u m _ n a m e   =   d o c u m e n t . g e t E l e m e n t B y I d ( c o l u m _ n a m e ) ; 
 
 f i r s t p a r t = " "   
 
 
 
 
 
 l a s t p a r t = " " 
 
 
 
 
 
   i f   ( ( n o w . g e t D a t e ( )   = =   c ) & & ( s h o w _ d a t e . g e t M o n t h ( )   = =   n o w . g e t M o n t h ( ) ) & & ( s h o w _ d a t e . g e t F u l l Y e a r ( )   = =   n o w . g e t F u l l Y e a r ( ) ) )   { c o l u m _ n a m e . s t y l e . b a c k g r o u n d C o l o r   =   " # C C C C C C " ; c o l u m _ n a m e . s t y l e . c o l o r   =   " # f f f f f f " ; } 
 
   c o l u m _ n a m e . i n n e r H T M L   =     f i r s t p a r t + c + l a s t p a r t ; 
 
   i + + ; 
 
   i f   ( i = = 7 ) { i = 0 ; j + + ; } 
 
 } 
 
 a f t e r _ i n i t ( ) ; 
 
 } 
 
 
 
 f u n c t i o n   i n i t ( ) 
 
 { 
 
 f o r ( j = 0 ; j < 6 ; j + + ) 
 
 { 
 
   f o r ( i = 0 ; i < 7 ; i + + ) 
 
   { 
 
   c o l u m _ n a m e   =   " d " + i + " r " + j ; 
 
   c o l u m _ n a m e   =   d o c u m e n t . g e t E l e m e n t B y I d ( c o l u m _ n a m e ) ; 
 
   c o l u m _ n a m e . i n n e r H T M L   =     " - " ; 
 
   c o l u m _ n a m e . s t y l e . b a c k g r o u n d C o l o r   = " # f f f f f f " ; 
 
   
 
   } 
 
 } 
 
 } 
 
 
 
 f u n c t i o n   a f t e r _ i n i t ( ) 
 
 { 
 
 f o r ( j = 0 ; j < 6 ; j + + ) 
 
 { 
 
   f o r ( i = 0 ; i < 7 ; i + + ) 
 
   { 
 
     c o l u m _ n a m e   =   " d " + i + " r " + j ; 
 
   c o l u m _ n a m e   =   d o c u m e n t . g e t E l e m e n t B y I d ( c o l u m _ n a m e ) ; 
 
   c o l u m _ n a m e . s t y l e . c o l o r   =   " b l u e " ; 
 
   i f   ( c o l u m _ n a m e . i n n e r H T M L   = =   " - " ) 
 
   { 
 
   c o l u m _ n a m e . s t y l e . c o l o r   = " w h i t e " ; 
 
   } 
 
 } 
 
 } 
 
 } 
 
 
 
 f u n c t i o n   c h a n g e _ m o n t h ( s e l _ m o n t h ) 
 
 { 
 
 s h o w _ d a t e   =   n e w   D a t e ( s h o w _ d a t e . g e t F u l l Y e a r ( ) , s e l _ m o n t h , 1 ) ; 
 
 s e t _ c a l ( s h o w _ d a t e ) ; 
 
 } 
 
 
 
 f u n c t i o n   c h a n g e _ y e a r ( s e l _ y e a r ) 
 
 { 
 
 s e l _ y e a r   =   s e l _ y e a r . v a l u e ; 
 
 s h o w _ d a t e   =   n e w   D a t e ( s e l _ y e a r , s h o w _ d a t e . g e t M o n t h ( ) , 1 ) ; 
 
 s e t _ c a l ( s h o w _ d a t e ) ; 
 
 } 
 
 
 
 < / S C R I P T > 	 	 	 	 	 
 
 	 < / t d > 
 
 	 	 < / t r > 
 
 	 < / t a b l e > 
 
 < / d i v > 
 
 